﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Com.DA;
using Com.BU;
using Com.GUI.LibraryManager.Controls.SubControl;
namespace Com
{
	/// <summary>
	/// Interaction logic for ucAirRoof.xaml
	/// </summary>
	public partial class ucAirRoof : UserControl
	{
        ucAirConditionRoofSurface rs = new ucAirConditionRoofSurface();
        ucAirConditonRoofCeiling rc = new ucAirConditonRoofCeiling();
		public ucAirRoof()
		{
			this.InitializeComponent();
           
            enableButtons();
		}

        private void enableButtons()
        {
            btnCancel.IsEnabled = false;
            btnSave.IsEnabled = false;

            btnNew.IsEnabled = true;
            btnCopy.IsEnabled = true;
            btnDelete.IsEnabled = true;
        }
        private void disableButtons()
        {
            btnCancel.IsEnabled = true;
            btnSave.IsEnabled = true;

            btnNew.IsEnabled = false;
            btnCopy.IsEnabled = false;
            btnDelete.IsEnabled = false;
        }

    

        private void btnNew_Click(object sender, RoutedEventArgs e)
        {
            if (cbxDescription.SelectedIndex == 0)
            {
            }
            if (cbxDescription.SelectedIndex == 1)
            {
            }

        }

        private void btnCopy_Click(object sender, RoutedEventArgs e)
        {
            if (cbxDescription.SelectedIndex == 0)
            {
            }
            if (cbxDescription.SelectedIndex == 1)
            {
            }
            disableButtons();
        }

        private void btnDelete_Click(object sender, RoutedEventArgs e)
        {
            if (cbxDescription.SelectedIndex == 0)
            {
            }
            if (cbxDescription.SelectedIndex == 1)
            {
            }
        }

        private void btnCancel_Click(object sender, RoutedEventArgs e)
        {
            if (cbxDescription.SelectedIndex == 0)
            {
            }
            if (cbxDescription.SelectedIndex == 1)
            {
            }
        }

        private void btnSave_Click(object sender, RoutedEventArgs e)
        {
            if (cbxDescription.SelectedIndex == 0)
            {
            }
            if (cbxDescription.SelectedIndex == 1)
            {
            }
        
        }

        private void comboBox1_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            dockPanel1.Children.Clear();
            if (cbxDescription.SelectedIndex == 0)
            {
                dockPanel1.Children.Add(rs);   
            }
            if (cbxDescription.SelectedIndex == 1)
            {
                dockPanel1.Children.Add(rc);
            }
        }

        private void LayoutRoot_Loaded(object sender, RoutedEventArgs e)
        {
            cbxDescription.SelectedIndex = 0;
        }
	}
}